package cn.rkylin.oms.warehouse.shiporder.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.rkylin.core.IDataBaseFactory;
import cn.rkylin.oms.warehouse.shiporder.domain.ShiporderSku;
import cn.rkylin.oms.warehouse.shiporder.vo.ShiporderSkuVO;

/**
 * 发货商品DAO
 * 
 * @author 齐涛
 * @version 1.0
 * @created 28-9-2017 10:51:30
 */
@Repository(value = "shiporderSkuDAO")
public class ShiporderSkuDAOImpl implements ShiporderSkuDAO {

    @Autowired
    protected IDataBaseFactory dao;

    /**
     * 查询发货单商品列表
     * 
     * @param shiporderSkuVO
     *            发货单商品VO
     * @return 发货单商品列表
     * @throws Exception
     *             异常
     */
    public List<ShiporderSkuVO> selectShiporderSkuList(ShiporderSkuVO shiporderSkuVO) throws Exception {
        return dao.findAllList("selectShiporderSkuList", shiporderSkuVO);
    }

    /**
     * 系统发货单商品明细表信息插入数据库
     *
     * @param
     * @return
     * @throws Exception
     */
    public int insertSelectiveShiporderSku(ShiporderSkuVO shiporderSkuVO) throws Exception {
        return dao.insert("insertSelectiveShiporderSku", shiporderSkuVO);
    }

    @Override
    public int updateShipOrderSkuById(ShiporderSkuVO vo) throws Exception {
        return dao.update("updateShipOrderSkuById", vo);
    }
}
